[branch-4.1][fix](security) Add auth and config gate for _stream_load_forward endpoint#65377
[branch-4.1][fix](security) Add auth and config gate for _stream_load_forward endpoint#65377liaoxin01 wants to merge 1 commit into
Conversation
…point (apache#64935) - **SSRF fix**: `_stream_load_forward` BE endpoint was registered unconditionally without authentication, allowing unauthenticated SSRF attacks - Add BE config `enable_group_commit_streamload_be_forward` (default `false`) to gate endpoint registration, matching the existing FE config name
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
There was a problem hiding this comment.
Pull request overview
This PR backports a security fix to the BE _stream_load_forward endpoint by adding an explicit BE-side config gate and wiring the endpoint into the existing HTTP auth framework, aligning it with cloud group-commit forwarding behavior.
Changes:
- Gate
/api/{db}/{table}/_stream_load_forwardbehindenable_group_commit_streamload_be_forward(defaultfalse) in BE. - Require HTTP auth for the forward handler by converting it to
HttpHandlerWithAuthand passingExecEnvfromHttpService. - Update the regression test cluster config to enable the feature flag on both FE and BE.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| regression-test/suites/load_p0/stream_load/test_group_commit_redirect.groovy | Enables the new BE config gate in the regression test cluster setup. |
| be/src/service/http/action/stream_load_forward_handler.h | Switches the handler base class to HttpHandlerWithAuth and adds an ExecEnv* constructor. |
| be/src/service/http/action/stream_load_forward_handler.cpp | Adds the runtime config gate and calls the auth hook in on_header. |
| be/src/service/http_service.cpp | Constructs the forward handler with _env (required for auth). |
| be/src/common/config.h | Declares the new BE config enable_group_commit_streamload_be_forward. |
| be/src/common/config.cpp | Defines the new BE config with default false. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
run buildall |
1 similar comment
|
run buildall |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
1 similar comment
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
Pick #64935